import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'

export default class MyNavLink extends Component {
    render() {
        //获取 MyNavLink 标签中的 to 属性
        let to = this.props.to;
        //获取组件标签中间的文本
        let title = this.props.children;
        return (
            <NavLink to={to}  className="list-group-item">{title}</NavLink>
        )
    }
}
